<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="./css/animate.min.css">
    <style>
        .my-ele {
            /* 设置动画执行次数 */
            /* animation-iteration-count: 2 !important; */
            animation-duration: 2s;
        }
    </style>
</head>

<body>
    <!-- 
        animate__animated: 基础选择器, 必须添加
        animate__bounce: 决定动画效果的选择器
    -->
    <h1 class="my-ele animate__animated">An animated element</h1>
    <hr>
    <button id="btn">执行动画效果</button>
    <script>
        btn.onclick = function () {
            // animate__zoomInUp
            var dom = document.querySelector('.animate__animated')
            dom.classList.add('animate__zoomInUp')
            setTimeout(() => {
                dom.classList.remove('animate__zoomInUp')
            }, 1000)
        }
    </script>
</body>

</html>